package com.ruoyi.galaxy.api.project;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.galaxy.api.AbstractGalaxyApi;
import com.ruoyi.galaxy.vo.project.GalaxyApiProjectEventResponse;
import com.ruoyi.galaxy.vo.GalaxyApiResponse;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author yeoman
 * @date 2025/4/10 21:22
 * @description 银河票务场次票档
 */
@Service
public class GalaxyApiProjectEvent extends AbstractGalaxyApi {

    @Override
    protected <T> Map<String, Object> setUriVariables(T request) {
        Map<String, Object> uriVariables = new HashMap<>(3);
        uriVariables.put("eventToken", request);
        uriVariables.put("langType", 1);
        return uriVariables;
    }

    @Override
    protected GalaxyApiResponse parseResponseData(JSONObject data) {
        return JSON.parseObject(JSON.toJSONString(data), GalaxyApiProjectEventResponse.class);
    }

}
